gdk: Remove gdk_text_property_to_utf8_list_for_display()
authorBenjamin Otte <otte@redhat.com>
Sat, 22 Feb 2020 22:15:25 +0000 (23:15 +0100)
committerBenjamin Otte <otte@redhat.com>
Sun, 23 Feb 2020 00:59:26 +0000 (01:59 +0100)
A lot of files became empty now, so they have been removed, which makes
this commit seem larger than it is.

33 files changed:
docs/reference/gdk/gdk4-docs.xml
docs/reference/gdk/gdk4-sections.txt
gdk/broadway/gdkdisplay-broadway.c
gdk/broadway/gdkdnd-broadway.c
gdk/broadway/gdkprivate-broadway.h
gdk/broadway/gdkselection-broadway.c [deleted file]
gdk/broadway/meson.build
gdk/gdk.h
gdk/gdkdisplayprivate.h
gdk/gdkproperty.c [deleted file]
gdk/gdkproperty.h [deleted file]
gdk/gdkselection.c [deleted file]
gdk/meson.build
gdk/quartz/gdkdisplay-quartz.c
gdk/quartz/gdkdisplay-quartz.h
gdk/quartz/gdkselection-quartz.c
gdk/wayland/gdkdisplay-wayland.c
gdk/wayland/gdkdrag-wayland.c
gdk/wayland/gdkdrop-wayland.c
gdk/wayland/gdkprivate-wayland.h
gdk/wayland/gdkselection-wayland.c [deleted file]
gdk/wayland/meson.build
gdk/win32/gdkclipdrop-win32.c
gdk/win32/gdkdisplay-win32.c
gdk/win32/gdkdrag-win32.c
gdk/win32/gdkdrop-win32.c
gdk/win32/gdkprivate-win32.h
gdk/win32/gdkproperty-win32.c
gdk/x11/gdkdisplay-x11.c
gdk/x11/gdkdrag-x11.c
gdk/x11/gdkdrop-x11.c
gdk/x11/gdkproperty-x11.c
gdk/x11/gdkselection-x11.c

index 31dd72f96ca68c868252f5f74d0b70c5c0ff380c..74fe5df7189e221c7bd5265c999b2f4c2ff77ad2 100644 (file)
@@ -44,7 +44,6 @@
     <xi:include href="xml/gdkcontentprovider.xml" />
     <xi:include href="xml/gdkcontentserializer.xml" />
     <xi:include href="xml/gdkcontentdeserializer.xml" />
-    <xi:include href="xml/properties.xml" />
     <xi:include href="xml/gdkapplaunchcontext.xml" />
     <xi:include href="xml/pixbufs.xml" />
     <xi:include href="xml/pango_interaction.xml" />
index c2702348f45a25972a9498a2fe2122fdd420edd3..c6814e2c7ccc09e04962e077a42e05c0fd9b8420 100644 (file)
@@ -347,13 +347,6 @@ gdk_content_formats_get_type
 gdk_content_formats_builder_get_type
 </SECTION>
 
-<SECTION>
-<TITLE>Properties and Atoms</TITLE>
-<FILE>properties</FILE>
-GdkAtom
-gdk_text_property_to_utf8_list_for_display
-</SECTION>
-
 <SECTION>
 <TITLE>Pango Interaction</TITLE>
 <FILE>pango_interaction</FILE>
index f35d3f56ef93e16c4ef4a8026b71c5fd25c57757..f5b3d4145bf54270ae703462eed349c554f7a4e0 100644 (file)
@@ -428,7 +428,6 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class)
   display_class->notify_startup_complete = gdk_broadway_display_notify_startup_complete;
   display_class->create_surface = _gdk_broadway_display_create_surface;
   display_class->get_keymap = _gdk_broadway_display_get_keymap;
-  display_class->text_property_to_utf8_list = _gdk_broadway_display_text_property_to_utf8_list;
 
   display_class->get_n_monitors = gdk_broadway_display_get_n_monitors;
   display_class->get_monitor = gdk_broadway_display_get_monitor;
index f672d26ed8a4643b6dd63afae7d2b410ac0cd7e0..04db887b26aed1c0273240bb6865e39fc7a14783 100644 (file)
@@ -27,7 +27,6 @@
 #include "gdkdragprivate.h"
 
 #include "gdksurfaceprivate.h"
-#include "gdkproperty.h"
 #include "gdkprivate-broadway.h"
 #include "gdkinternals.h"
 #include "gdkdisplay-broadway.h"
index 8e8d7813337472bdcd2116f0314a656de20fc4c6..f4f19cd534c2e6e9e95948706b41af1f4268fdf6 100644 (file)
@@ -113,12 +113,6 @@ GdkSurface * _gdk_broadway_display_create_surface (GdkDisplay     *display,
                                                    int             y,
                                                    int             width,
                                                    int             height);
-gint _gdk_broadway_display_text_property_to_utf8_list (GdkDisplay    *display,
-                                                       GdkAtom        encoding,
-                                                       gint           format,
-                                                       const guchar  *text,
-                                                       gint           length,
-                                                       gchar       ***list);
 GdkKeymap* _gdk_broadway_display_get_keymap (GdkDisplay *display);
 void _gdk_broadway_display_consume_all_input (GdkDisplay *display);
 BroadwayInputMsg * _gdk_broadway_display_block_for_input (GdkDisplay *display,
diff --git a/gdk/broadway/gdkselection-broadway.c b/gdk/broadway/gdkselection-broadway.c
deleted file mode 100644 (file)
index 6eb82f1..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
- */
-
-#include "config.h"
-
-#include "gdkproperty.h"
-#include "gdkprivate-broadway.h"
-#include "gdkdisplay-broadway.h"
-
-#include <string.h>
-
-
-static gint
-make_list (const gchar  *text,
-           gint          length,
-           gboolean      latin1,
-           gchar      ***list)
-{
-  GSList *strings = NULL;
-  gint n_strings = 0;
-  gint i;
-  const gchar *p = text;
-  const gchar *q;
-  GSList *tmp_list;
-  GError *error = NULL;
-
-  while (p < text + length)
-    {
-      gchar *str;
-
-      q = p;
-      while (*q && q < text + length)
-        q++;
-
-      if (latin1)
-        {
-          str = g_convert (p, q - p,
-                           "UTF-8", "ISO-8859-1",
-                           NULL, NULL, &error);
-
-          if (!str)
-            {
-              g_warning ("Error converting selection from STRING: %s",
-                         error->message);
-              g_error_free (error);
-            }
-        }
-      else
-        {
-          str = g_strndup (p, q - p);
-          if (!g_utf8_validate (str, -1, NULL))
-            {
-              g_warning ("Error converting selection from UTF8_STRING");
-              g_free (str);
-              str = NULL;
-            }
-        }
-
-      if (str)
-        {
-          strings = g_slist_prepend (strings, str);
-          n_strings++;
-        }
-
-      p = q + 1;
-    }
-
-  if (list)
-    {
-      *list = g_new (gchar *, n_strings + 1);
-      (*list)[n_strings] = NULL;
-    }
-
-  i = n_strings;
-  tmp_list = strings;
-  while (tmp_list)
-    {
-      if (list)
-        (*list)[--i] = tmp_list->data;
-      else
-        g_free (tmp_list->data);
-
-      tmp_list = tmp_list->next;
-    }
-
-  g_slist_free (strings);
-
-  return n_strings;
-}
-
-gint 
-_gdk_broadway_display_text_property_to_utf8_list (GdkDisplay    *display,
-                                                 GdkAtom        encoding,
-                                                 gint           format,
-                                                 const guchar  *text,
-                                                 gint           length,
-                                                 gchar       ***list)
-{
-  g_return_val_if_fail (text != NULL, 0);
-  g_return_val_if_fail (length >= 0, 0);
-  g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
-
-  if (encoding == g_intern_static_string ("STRING"))
-    {
-      return make_list ((gchar *)text, length, TRUE, list);
-    }
-  else if (encoding == g_intern_static_string ("UTF8_STRING"))
-    {
-      return make_list ((gchar *)text, length, FALSE, list);
-    }
-  
-  if (list)
-    *list = NULL;
-  return 0;
-}
-
index c9aa9314f039055ee9a52125ff2761a8a223f506..57bff27cae40834d89a240a996c70883088e3a3a 100644 (file)
@@ -13,7 +13,6 @@ gdk_broadway_sources = files([
   'gdkglobals-broadway.c',
   'gdkkeys-broadway.c',
   'gdkmonitor-broadway.c',
-  'gdkselection-broadway.c',
   'gdksurface-broadway.c',
 ])
 
index a537ed341ffda786ecbbe1396229070938128dfd..bba82173f3182bd731546845b295bf05c2509a99 100644 (file)
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -60,7 +60,6 @@
 #include <gdk/gdkpaintable.h>
 #include <gdk/gdkpango.h>
 #include <gdk/gdkpixbuf.h>
-#include <gdk/gdkproperty.h>
 #include <gdk/gdkrectangle.h>
 #include <gdk/gdkrgba.h>
 #include <gdk/gdkseat.h>
index f20f79855e7cd295fa63cf77217120326d5175df..433f699f40ab58e87495ce8425dad771196ef96c 100644 (file)
@@ -150,13 +150,6 @@ struct _GdkDisplayClass
 
   GdkKeymap *                (*get_keymap)         (GdkDisplay    *display);
 
-  gint                   (*text_property_to_utf8_list) (GdkDisplay     *display,
-                                                        GdkAtom         encoding,
-                                                        gint            format,
-                                                        const guchar   *text,
-                                                        gint            length,
-                                                        gchar        ***list);
-
   gboolean               (*make_gl_context_current)    (GdkDisplay        *display,
                                                         GdkGLContext      *context);
 
diff --git a/gdk/gdkproperty.c b/gdk/gdkproperty.c
deleted file mode 100644 (file)
index c43f13e..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 2000 Red Hat, Inc.
- *               2005 Imendio AB
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include "gdkproperty.h"
-
-#include "gdkinternals.h"
-
-/**
- * SECTION:properties
- * @Short_description: Functions to manipulate properties on windows
- * @Title: Properties and Atoms
- *
- * Each window under X can have any number of associated
- * “properties” attached to it.
- * Properties are arbitrary chunks of data identified by
- * “atom”s. (An “atom”
- * is a numeric index into a string table on the X server. They are used
- * to transfer strings efficiently between clients without
- * having to transfer the entire string.) A property
- * has an associated type, which is also identified
- * using an atom.
- *
- * A property has an associated “format”,
- * an integer describing how many bits are in each unit
- * of data inside the property. It must be 8, 16, or 32.
- * When data is transferred between the server and client,
- * if they are of different endianesses it will be byteswapped
- * as necessary according to the format of the property.
- * Note that on the client side, properties of format 32
- * will be stored with one unit per long,
- * even if a long integer has more than 32 bits on the platform.
- * (This decision was apparently made for Xlib to maintain
- * compatibility with programs that assumed longs were 32
- * bits, at the expense of programs that knew better.)
- *
- * The functions in this section are used to add, remove
- * and change properties on windows, to convert atoms
- * to and from strings and to manipulate some types of
- * data commonly stored in X window properties.
- */
diff --git a/gdk/gdkproperty.h b/gdk/gdkproperty.h
deleted file mode 100644 (file)
index 0ff5139..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#ifndef __GDK_PROPERTY_H__
-#define __GDK_PROPERTY_H__
-
-#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
-#error "Only <gdk/gdk.h> can be included directly."
-#endif
-
-#include <gdk/gdktypes.h>
-#include <gdk/gdkversionmacros.h>
-
-G_BEGIN_DECLS
-
-
-GDK_AVAILABLE_IN_ALL
-gint   gdk_text_property_to_utf8_list_for_display (GdkDisplay     *display,
-                                                   GdkAtom         encoding,
-                                                   gint            format,
-                                                   const guchar   *text,
-                                                   gint            length,
-                                                   gchar        ***list);
-
-G_END_DECLS
-
-#endif /* __GDK_PROPERTY_H__ */
diff --git a/gdk/gdkselection.c b/gdk/gdkselection.c
deleted file mode 100644 (file)
index 6905110..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
- */
-
-#include "config.h"
-
-#include "gdkproperty.h"
-
-#include "gdkdisplayprivate.h"
-
-
-/**
- * gdk_text_property_to_utf8_list_for_display:
- * @display:  a #GdkDisplay
- * @encoding: an atom representing the encoding of the text
- * @format:   the format of the property
- * @text:     (array length=length): the text to convert
- * @length:   the length of @text, in bytes
- * @list:     (out) (array zero-terminated=1): location to store the list
- *            of strings or %NULL. The list should be freed with
- *            g_strfreev().
- *
- * Converts a text property in the given encoding to
- * a list of UTF-8 strings.
- *
- * Returns: the number of strings in the resulting list
- */
-gint
-gdk_text_property_to_utf8_list_for_display (GdkDisplay     *display,
-                                            GdkAtom         encoding,
-                                            gint            format,
-                                            const guchar   *text,
-                                            gint            length,
-                                            gchar        ***list)
-{
-  g_return_val_if_fail (text != NULL, 0);
-  g_return_val_if_fail (length >= 0, 0);
-  g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
-
-  return GDK_DISPLAY_GET_CLASS (display)
-           ->text_property_to_utf8_list (display, encoding, format, text, length, list);
-}
-
index af04354d88ada086c0fba9e64365c2e7b068d505..1df3b60e74a94165d5222dcbf9313e7efd0f5993 100644 (file)
@@ -35,12 +35,10 @@ gdk_public_sources = files([
   'gdkpango.c',
   'gdkpixbuf-drawable.c',
   'gdkpipeiostream.c',
-  'gdkproperty.c',
   'gdkrectangle.c',
   'gdkrgba.c',
   'gdkseat.c',
   'gdkseatdefault.c',
-  'gdkselection.c',
   'gdksnapshot.c',
   'gdktexture.c',
   'gdkvulkancontext.c',
@@ -82,7 +80,6 @@ gdk_public_headers = files([
   'gdkpaintable.h',
   'gdkpango.h',
   'gdkpixbuf.h',
-  'gdkproperty.h',
   'gdkrectangle.h',
   'gdkrgba.h',
   'gdkseat.h',
index bf165e252cade3f90a71e2a7955c164dd3478762..300d9d8481a09fc506d79eb73e5ba35dac804881 100644 (file)
@@ -230,7 +230,6 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
   display_class->event_data_free = _gdk_quartz_display_event_data_free;
   display_class->create_surface_impl = _gdk_quartz_display_create_surface_impl;
   display_class->get_keymap = _gdk_quartz_display_get_keymap;
-  display_class->text_property_to_utf8_list = _gdk_quartz_display_text_property_to_utf8_list;
   display_class->get_n_monitors = gdk_quartz_display_get_n_monitors;
   display_class->get_monitor = gdk_quartz_display_get_monitor;
   display_class->get_setting = gdk_quartz_display_get_setting;
index 8e5543be4ca7fa97758750f84dbbf6c06ccfa1cc..7d6923738b382a31ba4fa2527f529700af0d3941 100644 (file)
@@ -70,12 +70,6 @@ void       _gdk_quartz_display_create_surface_impl (GdkDisplay    *display,
 /* Display methods - keymap */
 GdkKeymap * _gdk_quartz_display_get_keymap (GdkDisplay *display);
 
-gint        _gdk_quartz_display_text_property_to_utf8_list (GdkDisplay     *display,
-                                                            GdkAtom         encoding,
-                                                            gint            format,
-                                                            const guchar   *text,
-                                                            gint            length,
-                                                            gchar        ***list);
 
 G_END_DECLS
 
index e79ca91e4579d96e03725b0f1d0579f739960f12..3f69d031005fc873eefb91fc455a458f2f8ad372 100644 (file)
 
 #include "config.h"
 
-#include "gdkproperty.h"
 #include "gdkquartz.h"
 
-static gint
-make_list (const gchar  *text,
-          gint          length,
-          gboolean      latin1,
-          gchar      ***list)
-{
-  GSList *strings = NULL;
-  gint n_strings = 0;
-  gint i;
-  const gchar *p = text;
-  const gchar *q;
-  GSList *tmp_list;
-  GError *error = NULL;
-
-  while (p < text + length)
-    {
-      gchar *str;
-      
-      q = p;
-      while (*q && q < text + length)
-       q++;
-
-      if (latin1)
-       {
-         str = g_convert (p, q - p,
-                          "UTF-8", "ISO-8859-1",
-                          NULL, NULL, &error);
-
-         if (!str)
-           {
-             g_warning ("Error converting selection from STRING: %s",
-                        error->message);
-             g_error_free (error);
-           }
-       }
-      else
-       str = g_strndup (p, q - p);
-
-      if (str)
-       {
-         strings = g_slist_prepend (strings, str);
-         n_strings++;
-       }
-
-      p = q + 1;
-    }
-
-  if (list)
-    *list = g_new0 (gchar *, n_strings + 1);
-
-  i = n_strings;
-  tmp_list = strings;
-  while (tmp_list)
-    {
-      if (list)
-       (*list)[--i] = tmp_list->data;
-      else
-       g_free (tmp_list->data);
-
-      tmp_list = tmp_list->next;
-    }
-
-  g_slist_free (strings);
-
-  return n_strings;
-}
-
-gint
-_gdk_quartz_display_text_property_to_utf8_list (GdkDisplay    *display,
-                                                GdkAtom        encoding,
-                                                gint           format,
-                                                const guchar  *text,
-                                                gint           length,
-                                                gchar       ***list)
-{
-  g_return_val_if_fail (text != NULL, 0);
-  g_return_val_if_fail (length >= 0, 0);
-
-  if (encoding == g_intern_static_string ("STRING"))
-    {
-      return make_list ((gchar *)text, length, TRUE, list);
-    }
-  else if (encoding == g_intern_static_string ("UTF8_STRING"))
-    {
-      return make_list ((gchar *)text, length, FALSE, list);
-    }
-  else
-    {
-      g_warning ("gdk_text_property_to_utf8_list_for_display: encoding %s not handled", (const char *)encoding);
-
-      if (list)
-       *list = NULL;
-
-      return 0;
-    }
-}
-
 GdkAtom
 gdk_quartz_pasteboard_type_to_atom_libgtk_only (NSString *type)
 {
index 199468e03e723348c9657c62128b6678f210a80e..ef7b32b95e2b21f4da9da17c8d10c7e6e165e75a 100644 (file)
@@ -1030,7 +1030,6 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass *class)
   display_class->notify_startup_complete = gdk_wayland_display_notify_startup_complete;
   display_class->create_surface = _gdk_wayland_display_create_surface;
   display_class->get_keymap = _gdk_wayland_display_get_keymap;
-  display_class->text_property_to_utf8_list = _gdk_wayland_display_text_property_to_utf8_list;
 
   display_class->make_gl_context_current = gdk_wayland_display_make_gl_context_current;
 
index 833309048a461b7b085d5d859167b14f4d2e5fb0..b0430b025d7302ce8c01245725e73369d2ee9ec7 100644 (file)
@@ -20,7 +20,6 @@
 #include "gdkdragprivate.h"
 
 #include "gdkinternals.h"
-#include "gdkproperty.h"
 #include "gdkprivate-wayland.h"
 #include "gdkcontentformats.h"
 #include "gdkdisplay-wayland.h"
index f9ed7de123f65db1d11904d0145fac362fe88264..2af437907720db8d999206f34dd03c51f37d435e 100644 (file)
@@ -20,7 +20,6 @@
 #include "gdkdropprivate.h"
 
 #include "gdkinternals.h"
-#include "gdkproperty.h"
 #include "gdkprivate-wayland.h"
 #include "gdkcontentformats.h"
 #include "gdkdisplay-wayland.h"
index 830e185029d8e94115370ee7aa29837d2844db88..f472bf7759c468cb4df101f3901eff7ed0f6c9f3 100644 (file)
@@ -127,13 +127,6 @@ GdkSurface * _gdk_wayland_display_create_surface (GdkDisplay *display,
                                                   int         width,
                                                   int         height);
 
-gint        _gdk_wayland_display_text_property_to_utf8_list (GdkDisplay    *display,
-                                                             GdkAtom        encoding,
-                                                             gint           format,
-                                                             const guchar  *text,
-                                                             gint           length,
-                                                             gchar       ***list);
-
 void        _gdk_wayland_display_create_seat    (GdkWaylandDisplay *display,
                                                  guint32                  id,
                                                  struct wl_seat          *seat);
diff --git a/gdk/wayland/gdkselection-wayland.c b/gdk/wayland/gdkselection-wayland.c
deleted file mode 100644 (file)
index 8f02cdd..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <gio/gunixinputstream.h>
-#include <gio/gunixoutputstream.h>
-#include <glib-unix.h>
-
-#include "gdkwayland.h"
-#include "gdkprivate-wayland.h"
-#include "gdkdisplay-wayland.h"
-#include "gdkcontentformatsprivate.h"
-#include "gdkproperty.h"
-
-#include <string.h>
-
-gint
-_gdk_wayland_display_text_property_to_utf8_list (GdkDisplay    *display,
-                                                 GdkAtom        encoding,
-                                                 gint           format,
-                                                 const guchar  *text,
-                                                 gint           length,
-                                                 gchar       ***list)
-{
-  GPtrArray *array;
-  const gchar *ptr;
-  gsize chunk_len;
-  gchar *copy;
-  guint nitems;
-
-  ptr = (const gchar *) text;
-  array = g_ptr_array_new ();
-
-  while (ptr < (const gchar *) &text[length])
-    {
-      chunk_len = strlen (ptr);
-
-      if (g_utf8_validate (ptr, chunk_len, NULL))
-        {
-          copy = g_strndup (ptr, chunk_len);
-          g_ptr_array_add (array, copy);
-        }
-
-      ptr = &ptr[chunk_len + 1];
-    }
-
-  nitems = array->len;
-  g_ptr_array_add (array, NULL);
-
-  if (list)
-    *list = (gchar **) g_ptr_array_free (array, FALSE);
-  else
-    g_ptr_array_free (array, TRUE);
-
-  return nitems;
-}
-
index a6fe2a88c58aceabdfc6e67d51f58c0dccb6e854..b6592064fba198c453abfeae90c48a35bb3444bd 100644 (file)
@@ -14,7 +14,6 @@ gdk_wayland_sources = files([
   'gdkkeys-wayland.c',
   'gdkmonitor-wayland.c',
   'gdkprimary-wayland.c',
-  'gdkselection-wayland.c',
   'gdkvulkancontext-wayland.c',
   'gdksurface-wayland.c',
   'wm-button-layout-translation.c',
index cd40dedaf34fc737493d04abc734bcfd358dd3ad..53ebd916b8e45f66fe60f2019261021b1c3a3ab7 100644 (file)
@@ -273,7 +273,6 @@ Otherwise it's similar to how the clipboard works. Only the DnD server
 /* for CIDA */
 #include <shlobj.h>
 
-#include "gdkproperty.h"
 #include "gdkdisplay.h"
 #include "gdkprivate-win32.h"
 #include "gdkclipboardprivate.h"
@@ -2681,107 +2680,6 @@ _gdk_win32_transmute_contentformat (const gchar   *from_contentformat,
   return TRUE;
 }
 
-static gint
-make_list (const gchar  *text,
-          gint          length,
-          gboolean      latin1,
-          gchar      ***list)
-{
-  GSList *strings = NULL;
-  gint n_strings = 0;
-  gint i;
-  const gchar *p = text;
-  const gchar *q;
-  GSList *tmp_list;
-  GError *error = NULL;
-
-  while (p < text + length)
-    {
-      gchar *str;
-
-      q = p;
-      while (*q && q < text + length)
-       q++;
-
-      if (latin1)
-       {
-         str = g_convert (p, q - p,
-                          "UTF-8", "ISO-8859-1",
-                          NULL, NULL, &error);
-
-         if (!str)
-           {
-             g_warning ("Error converting selection from STRING: %s",
-                        error->message);
-             g_error_free (error);
-           }
-       }
-      else
-       str = g_strndup (p, q - p);
-
-      if (str)
-       {
-         strings = g_slist_prepend (strings, str);
-         n_strings++;
-       }
-
-      p = q + 1;
-    }
-
-  if (list)
-    *list = g_new (gchar *, n_strings + 1);
-
-  (*list)[n_strings] = NULL;
-
-  i = n_strings;
-  tmp_list = strings;
-  while (tmp_list)
-    {
-      if (list)
-       (*list)[--i] = tmp_list->data;
-      else
-       g_free (tmp_list->data);
-
-      tmp_list = tmp_list->next;
-    }
-
-  g_slist_free (strings);
-
-  return n_strings;
-}
-
-gint
-_gdk_win32_display_text_property_to_utf8_list (GdkDisplay    *display,
-                                              GdkAtom        encoding,
-                                              gint           format,
-                                              const guchar  *text,
-                                              gint           length,
-                                              gchar       ***list)
-{
-  g_return_val_if_fail (text != NULL, 0);
-  g_return_val_if_fail (length >= 0, 0);
-
-  if (encoding == g_intern_static_string ("STRING"))
-    {
-      return make_list ((gchar *)text, length, TRUE, list);
-    }
-  else if (encoding == _gdk_win32_clipdrop_atom (GDK_WIN32_ATOM_INDEX_TEXT_PLAIN_UTF8))
-    {
-      return make_list ((gchar *)text, length, FALSE, list);
-    }
-  else
-    {
-      const char *enc_name = (const char *)encoding;
-
-      g_warning ("gdk_text_property_to_utf8_list_for_display: encoding %s not handled\n", enc_name);
-
-      if (list)
-       *list = NULL;
-
-      return 0;
-    }
-}
-
 gint
 _gdk_win32_add_contentformat_to_pairs (const gchar *contentformat,
                                        GArray      *array)
index 7f9785b239c1fe7444977ade983554ebc50d51db..ffda794ec76cf3e8788c7b6b2769e874eb957a7a 100644 (file)
@@ -1118,7 +1118,6 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
   display_class->create_surface = _gdk_win32_display_create_surface;
 
   display_class->get_keymap = _gdk_win32_display_get_keymap;
-  display_class->text_property_to_utf8_list = _gdk_win32_display_text_property_to_utf8_list;
   display_class->make_gl_context_current = _gdk_win32_display_make_gl_context_current;
 
   display_class->get_n_monitors = gdk_win32_display_get_n_monitors;
index 24df191d05d4dfb17170ee27e53350306ac66b29..619beaca33a0ec6d1c954e8897e21b1ca67fb053 100644 (file)
 #define COBJMACROS
 
 #include "gdkdrag.h"
-#include "gdkproperty.h"
 #include "gdkinternals.h"
 #include "gdkprivate-win32.h"
 #include "gdkwin32.h"
index 3bcb92b89ba552bb9799ff88741e217d58fa3e79..f7244f8f2e6d385c8df847db68805a64942296af 100644 (file)
@@ -42,7 +42,6 @@
 #include "gdkdropprivate.h"
 
 #include "gdkdrag.h"
-#include "gdkproperty.h"
 #include "gdkinternals.h"
 #include "gdkprivate-win32.h"
 #include "gdkwin32.h"
index e4821d71b15db55ef9b2ddb9fed2069283d02df3..c6377fbc24b1f144ce0395f6a5531d32bcd8960d 100644 (file)
@@ -395,12 +395,6 @@ void      _gdk_win32_display_convert_selection (GdkDisplay *display,
                                                 GdkAtom    selection,
                                                 GdkAtom    target,
                                                 guint32    time);
-gint      _gdk_win32_display_text_property_to_utf8_list (GdkDisplay    *display,
-                                                         GdkAtom        encoding,
-                                                         gint           format,
-                                                         const guchar  *text,
-                                                         gint           length,
-                                                         gchar       ***list);
 
 gboolean   _gdk_win32_keymap_has_altgr           (GdkWin32Keymap *keymap);
 guint8     _gdk_win32_keymap_get_active_group    (GdkWin32Keymap *keymap);
index d0bc65ff5939ad441b5c02051f8b87a957b384a0..7fbf644b5e88e2a5df63b24647d86958f8c63355 100644 (file)
@@ -29,7 +29,6 @@
 #include <glib/gprintf.h>
 #include <pango/pangowin32.h>
 
-#include "gdkproperty.h"
 #include "gdkdisplayprivate.h"
 #include "gdkprivate-win32.h"
 #include "gdkwin32.h"
index 7147ad6a2358be9da05dccf621031bb4154886f4..1502666081c9ff493aab7abf06c1b6a67910800a 100644 (file)
@@ -3052,7 +3052,6 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
   display_class->notify_startup_complete = gdk_x11_display_notify_startup_complete;
   display_class->create_surface = _gdk_x11_display_create_surface;
   display_class->get_keymap = gdk_x11_display_get_keymap;
-  display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list;
 
   display_class->make_gl_context_current = gdk_x11_display_make_gl_context_current;
 
index 8445a7340cdf21c899f56163e987184b6bb1ec23..a6c70ef22436816e67515b9147dba7741d96064f 100644 (file)
@@ -36,7 +36,6 @@
 #include "gdksurfaceprivate.h"
 #include "gdkinternals.h"
 #include "gdkintl.h"
-#include "gdkproperty.h"
 #include "gdkprivate-x11.h"
 #include "gdkscreen-x11.h"
 #include "gdkselectioninputstream-x11.h"
index fa4ca6b45a9a35d930ee4e557a2f33e102ecd6c5..d5cce6a6e1c6c6236fcff17f4c4957c32b219387 100644 (file)
@@ -35,7 +35,6 @@
 #include "gdkdragprivate.h"
 #include "gdkinternals.h"
 #include "gdkintl.h"
-#include "gdkproperty.h"
 #include "gdkprivate-x11.h"
 #include "gdkscreen-x11.h"
 #include "gdkselectioninputstream-x11.h"
index 5579e6a4b444e3511796ea5257ab9f1f1ce81738..63c6015393c1aaacf6a207aef2a0084ed2313190 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "config.h"
 
-#include "gdkproperty.h"
 #include "gdkinternals.h"
 #include "gdkprivate-x11.h"
 #include "gdkdisplay-x11.h"
index 169ba661fa7258feeb50aff4c562b6b0e3f0e3b9..7bb016aa86a3c1f8e515dc714861b29e296ba593 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "config.h"
 
-#include "gdkproperty.h"
 #include "gdkprivate-x11.h"
 #include "gdkdisplay-x11.h"